package com.fqy.gmall.item.client;

import com.fqy.gmall.common.result.Result;
import com.fqy.gmall.item.client.impl.ItemDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * service-item 微服务的数据接口发布到feign 上！
 */

@FeignClient(value = "service-item",fallback = ItemDegradeFeignClient.class)
public interface ItemFeignClient {
    //  service-item 微服务的数据接口发布到feign 上！
    @GetMapping("/api/item/{skuId}")
    Result getItemBySkuId(@PathVariable("skuId") Long skuId);
}
